package com.yisu.expressway.location;

import android.text.TextUtils;

/**
 * Created by Yue Zhen on 2016/1/24.
 */
public class LocationInfo {
    private String addr;//地址
    private double latitude;//纬度
    private double longitude;//经度

    private long locTime;
    private String province;
    private String city;
    private String district;
    private String street;

    public LocationInfo() {

    }

    public LocationInfo(String addr, double latitude, double longitude) {
        this.addr = addr;
        this.latitude = latitude;
        this.longitude = longitude;
    }

    public String getAddr() {
        return addr;
    }

    public void setAddr(String addr) {
        this.addr = addr;
    }

    public double getLatitude() {
        return latitude;
    }

    public void setLatitude(double latitude) {
        this.latitude = latitude;
    }

    public double getLongitude() {
        return longitude;
    }

    public void setLongitude(double longitude) {
        this.longitude = longitude;
    }

    public long getLocTime() {
        return locTime;
    }

    public void setLocTime(long locTime) {
        this.locTime = locTime;
    }

    public String getProvince() {
        return province;
    }

    public void setProvince(String province) {
        this.province = province;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getDistrict() {
        return district;
    }

    public void setDistrict(String district) {
        this.district = district;
    }

    public String getStreet() {
        return street;
    }

    public void setStreet(String street) {
        this.street = street;
    }


    public String getLocInfo(){
        StringBuilder strb = new StringBuilder();
        if (!TextUtils.isEmpty(province)){
            strb.append(province).append(" ");
        }
        if (!TextUtils.isEmpty(city)){
            strb.append(city).append(" ");
        }
        if (!TextUtils.isEmpty(district)){
            strb.append(district);
        }


        return strb.toString();
    }
}
